package com.fanshuai2.niuke.strings;

import java.util.Scanner;

public class BigSum {
    static String stringAdd(String a, String b) {
        int m = a.length() - 1;
        int n = b.length() - 1;

        StringBuilder builder = new StringBuilder();
        int carry = 0;
        while (m >= 0 || n >= 0) {
            char cha = m >= 0 ? a.charAt(m) : '0';
            char chb = n >= 0 ? b.charAt(n) : '0';

            int sum = cha - '0' + chb - '0' + carry;
            builder.append(sum % 10);
            carry = sum / 10;

            m--;
            n--;
        }
        if (carry > 0) {
            builder.append(carry);
        }

        return builder.reverse().toString();
    }
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);

        while (in.hasNextLine()) {
            String a = in.nextLine();
            String b = in.nextLine();
            System.out.println(stringAdd(a, b));
        }
    }
}
